home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Temp / MiscPickList / MiscPickListController.m < prev    next >
Text File  |  1995-04-12  |  1KB  |  53 lines

  1. //
  2. //    MiscPickListController.m -- Controller object works with PickList
  3. //        Written by Don Yacktman Copyright (c) 1994 by Don Yacktman.
  4. //                Version 0.1.  All rights reserved.
  5. //
  6. //        This notice may not be removed from this source code.
  7. //
  8. //    This object is included in the MiscKit by permission from the author
  9. //    and its use is governed by the MiscKit license, found in the file
  10. //    "LICENSE.rtf" in the MiscKit distribution.  Please refer to that file
  11. //    for a list of all applicable permissions and restrictions.
  12. //    
  13.  
  14. #import "MiscPickListController.h"
  15.  
  16. @implementation MiscPickListController
  17.  
  18. - init
  19. {
  20.     pickListName = [MiscString newWithString:"States"];
  21.     return self;
  22. }
  23.  
  24. - free
  25. {
  26.     if (pickListName) [pickListName free];
  27.     return [super free];
  28. }
  29.  
  30. - pickList
  31. {
  32.     if (!pickList) pickList = [MiscPickList findPickListNamed:pickListName];
  33.     return pickList;
  34. }
  35.  
  36. - bringUpPickList:sender
  37. {
  38.     return [[self pickList] popUpForTextPal:textPal];
  39. }
  40.  
  41. - textPal { return textPal; }
  42. - setTextPal:anObject { textPal = anObject; return self; }
  43. - (MiscString *)listName { return pickListName; }
  44. - setListName:(MiscString *)aName
  45. {
  46.     if (pickListName) [pickListName free];
  47.     pickListName = [aName copy];
  48.     pickList = nil;
  49.     return self;
  50. }
  51.  
  52. @end
  53.